﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PlanningGIS.Framework.Config;
using PlanningGIS.Util.Log;

namespace PlanningGIS.Statistics
{
    public class StatisticConfigHelper
    {
        private static StatisticConfig _StatisticConfig = null;

        /// <summary>
        /// 统计分析配置
        /// </summary>
        public static StatisticConfig StatisticConfig
        {
            get
            {
                if (_StatisticConfig == null)
                {
                    try
                    {
                        _StatisticConfig = ConfigHelper.GetObject<StatisticConfig>();
                    }
                    catch (Exception ex)
                    {
                        LogHelper.WriteErrorText("序列化StatisticConfig错误：" + ex.Message);
                    }
                }
                return _StatisticConfig;
            }
        }
    }
}
